package com.accenture.portal.service.questionnaire.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.accenture.portal.dao.questionnaire.QuestionMapper;
import com.accenture.portal.model.questionnaire.Question;
import com.accenture.portal.service.questionnaire.QuestionService;

@Service
public class QuestionServiceImpl implements QuestionService{
	@Autowired
	QuestionMapper questionMapper;

	@Override
	public Question getQuestionById(Integer questionId) {
		return questionMapper.getQuestionById(questionId);
	}

	@Override
	public void addQuestion(Question question) {
		questionMapper.addQuestion(question);
	}

	@Override
	public void deleteQuestion(Integer questionId) {
		questionMapper.deleteQuestion(questionId);
	}

	@Override
	public void editQuestion(Question question) {
		questionMapper.editQuestion(question);
	}

	@Override
	public List<Question> getQuestionByQuestionnaire(
			Integer questionnaireId) {
		return questionMapper.getQuestionByQuestionnaire(questionnaireId);
	}

	@Override
	public void deleteQuestionByQuestionnaire(Integer questionQuestionnaire) {
		questionMapper.deleteQuestionByQuestionnaire(questionQuestionnaire);
	}

}
